import { IsNotEmpty, IsUUID, MaxLength, IsOptional, ValidateIf } from 'class-validator';


export class CreateArticleCommentDto {
    @IsNotEmpty()
    @IsUUID()
    article_id: string;

    @IsNotEmpty()
    @MaxLength(200)
    moment: string;


    @IsOptional()
    @ValidateIf(o => o.parentMoment != '')
    @IsUUID()
    parent_id?: string

    @IsOptional()
    @ValidateIf(o => o.parentMoment != '')
    @IsUUID()
    replay_id?: string



}